<template>
  <div class="topUp">
    <div class="title">充值中心</div>
    <p v-if="paytype=='0'">
      <img src="./img/cg.png" alt>
      <br>
      <br>支付成功 请稍后查看是否到账
    </p>
    <p v-else>
      <img src="./img/sb.png" alt>
      <br>
      <br>支付失败
    </p>
    <div class="btn" @click="sure">确 定</div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      paytype: ""
    };
  },
  mounted() {
    this.paytype = this.$route.query.paytype;
    this.ProductID = this.$route.query.ProductID;
  },
  methods: {
    sure() {
      if (this.ProductID == "11") {
        this.$router.push({ path: "/gift", query: { pay: 1 } });
      } else if (this.ProductID == "12") {
        this.$router.push({ path: "/bag" });
      }
    }
  }
};
</script>
<style lang="stylus" scoped>
.topUp {
  width: 100%;
  height: 100%;
  background: #FFF;
  text-align: center;

  .title {
    line-height: 1rem;
    background: #001533;
    color: #FFF;
  }

  p {
    text-align: center;
    margin: 120px auto;
    color: #333;
    line-height: 0.6rem;
  }

  .btn {
    width: 70%;
    height: 0.8rem;
    line-height: 0.8rem;
    margin: 50px auto;
    color: #FFF;
    background: rgba(255, 155, 44, 1);
    border-radius: 5px;
  }
}
</style>
